home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / ewebedit / edit.asp < prev    next >
Text File  |  1999-06-27  |  4KB  |  98 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2.  
  3. <html>
  4. <head>
  5.     <title>Edit Page</title>
  6. <!--- Read from the database  Record ID = 2 and write this result to a hidden field --->    
  7. <!--- Note that the ASP code runs on the server, the browser does not see this code only what is written into the hidden field --->
  8. <% 
  9. myDSN="DSN=editor"
  10. mySQL="select Edit_html from WYSIWYG where edit_id=2"
  11. set conntemp=server.createobject("adodb.connection")
  12. conntemp.open myDSN
  13. set rstemp=conntemp.execute(mySQL)
  14. if  rstemp.eof then
  15.    response.write "no data for<br>"
  16.    response.write mySQL
  17.    conntemp.close
  18.    set conntemp=nothing
  19.    response.end      
  20. end if
  21. %>
  22. <script language="VBScript">
  23.     Sub OnLoad
  24.         frmMain.eWebEdit1.TextHTML = frmMain.TextHTMLHField.Value
  25.     End Sub
  26.     Sub btnSave_OnClick
  27.         frmMain.TextHTMLHField.Value = frmMain.eWebEdit1.TextHTML
  28.         End Sub
  29. </script>
  30. </head>
  31. <!--- The Onload event occurs when the browser finish loading the page This will cause the the vbscript to move the contents of the hidden
  32. field to the editor--->
  33. <body language="VBScript" onload="OnLoad">
  34.     <table width="625" cellpadding="0" cellspacing="0" border="0">
  35.         <tr>
  36.             <td width="113" height="35" valign="TOP" bgcolor="#639C63"><a href="http://www.ektron.com"><img src="EKlogo.gif" width=113 height=35 alt="" border=0></a></td>
  37.             <td width="505" align="CENTER" valign="BOTTOM" bgcolor="#639C63"></td>
  38.         </tr>
  39.         <tr>
  40.             <td align="CENTER" valign="TOP" bgcolor="#639C63"><img src="http://www.ektron.com/images/space.gif" width=1 height=300 alt="" border="0"></td>
  41.             <td align="center" valign="top">
  42.                 <table width="90%" cellspacing="2" cellpadding="2">
  43.                 <tr>
  44.                 <!--- When you click the Save button, the VBSCRIPT OnClick event will occur --->
  45.                     <form action="update.asp" method="POST" enablecab="No" name="frmMain">
  46.                         <tr>
  47.                             <td align="center"> </td>
  48.                         </tr>
  49.                         <tr>
  50.                             <td><font face="verdana, arial, helvetica" size="2">Note this License Key is for IP address 127.0.0.1, to purchase one for your domain name click <a href="https://www.ektron.com/ccproc/creditcard.cfm">here</a></font></td>
  51.                         </tr>
  52.                         <tr>
  53.                             <td align="center"> </td>
  54.                         </tr>
  55.                         <tr>
  56.                             <td>
  57.                                 <object id="eWebEdit1" name="eWebEdit1"
  58.                                 classid="clsid:5D479C55-C4BA-11D2-B97C-002078159EC3" 
  59.                                 CODEBASE="eWebEdit.CAB#version=2,3,0,0"
  60.                                 border="0" width="535" height="345">
  61.                                 <param name="License" value="127.0.0.1?650630331830908">
  62.                                 <param name="License2" value="localhost?850330421323576">
  63.                                 <param name="License3" value="">
  64.                                 <param name="TextHTML" value="">
  65.                                 <param name="FontSize" value="2">
  66.                                 <param name="FontName" value="Arial">
  67.                                 <param name="ButtonsEdit" value="True">
  68.                                 <param name="ButtonsFontSize" value="True">
  69.                                 <param name="ButtonsFontStyle" value="True">
  70.                                 <param name="ButtonsFontColor" value="True">
  71.                                 <param name="ButtonsBullets" value="True">
  72.                                 <param name="ButtonsIndent" value="True">
  73.                                 <param name="ButtonsAlign" value="True">
  74.                                 <param name="ButtonsHyperlink" value="True">
  75.                                 <param name="ButtonsPicture" value="True">
  76.                                 <param name="ButtonsAbout" value="True">
  77.                                 <param name="FTPServer" value="ftp.somenameorip.com">
  78.                                 <param name="FTPUsername" value="someusername">
  79.                                 <param name="FTPPassword" value="encryptedpassword">
  80.                                 <param name="ImagesPath" value="../images">
  81.                                 <param name="WDDX" value="<field name='IMAGE_TITLE'><string>Company Logo</string></field><field name='IMAGE_LOCATION'><string>images/logo.jpg</string></field><field name='FONT_FACE'><string>Arial</string><string>New Times Roman</string></field>">
  82.                                 </object>
  83.                                 <!--- This hidden field gets loaded from the database record 2 --->
  84.                                 <input type="hidden" name="TextHTMLHField" value="<% response.write rstemp.Fields("Edit_html") %>">
  85.                             </td>
  86.                         </tr>
  87.                         <tr>                    <!--- If you were were doing an Edit of a doucment you could use ASP to fill in the Hidden field then call the function below called on Click --->
  88.                             <td align="center"><input type="Submit" name="btnSave" value="Save"></td>
  89.                         </tr>
  90.                     </form>
  91.                 </table>
  92.             </td>
  93.         </tr>
  94.     </table>
  95.  
  96. </body>
  97. </html>
  98.